package com.youease.chris.manager
{
	import com.youease.chris.manager.GlobalObject;
	import com.youease.chris.model.vo.TextureData;
	
	import flash.utils.Dictionary;

	public class TexturesManager
	{
		public static var textures:Dictionary = new Dictionary();
		public static var bigTextures:Dictionary = new Dictionary();
		
		public function TexturesManager()
		{
			throw new Error("这个类是个纯粹的静态类");
		}
		
		public static function loadTexture(texture:TextureData):void {
			textures[texture.img] = texture;
			ImageLoader.instance.loadImg(GlobalObject.projectDir+"/textures/"+texture.img,texture,"bitmapdata");
		}
		
		public static function clear():void {
			for(var key:Object in textures) {
				delete textures[key];
			}
			for(var key2:Object in bigTextures) {
				delete bigTextures[key2];
			}
		}
	}
}